import request from '@/utils/request'

export function getCharacterList(data) {
  return request({
    url: `/online/statistic-report/statistic/character/list`, method: 'POST', data: data
  })
}

export function getStatisticDataList(data) {
  return request({
    url: `/online/statistic-report/statistic/data-list`, method: 'POST', data: data
  })
}

export function regenerateStatisticData(data) {
  return request({
    url: `/online/statistic-report/statistic/regenerate`, method: 'POST', data: data
  })
}

export function rePushStatisticData(data) {
  return request({
    url: `/online/statistic-report/statistic/re-push`, method: 'POST', data: data
  })
}

export function regenerateAndRePushStatisticData(data) {
  return request({
    url: `/online/statistic-report/statistic/regenerate-push`, method: 'POST', data: data
  })
}

export function getIotMonthList(params) {
  return request({
    url: `/online/iot/admin/flycare/report/record`,
    method: 'GET',
    params
  })
}

export function getIotMonthDetail(month, params) {
  return request({
    url: `/online/iot/admin/flycare/statistic/${month}`,
    method: 'GET',
    params
  })
}

export function regenerateAndPushIotData(params) {
  return request({
    url: `/online/iot/admin/flycare/report/record/regenerate/${params.month}`,
    method: 'POST',
    params
  })
}
